<script type="text/javascript">

var <?= $this->jsObject ?> = {

    opt: <?= $this->redirectParams ?>,

    url: "<?= $this->redirectUrl ?>",

    tableId: "#<?= $this->grid->tableId ?>",

    dialogOpt: {
        width:"226px"
    }        

};

(function ($f, $) {

    $.extend($f, {
        selectRow: function(rowid) {
            var q = $f.opt||{};
            q.nodeid = rowid;
            q = $.param(q);
            location.href = $f.url + '?' + q;
        },
        selectSingleRow: function() {
            var id = $($f.tableId).jqGrid('getGridParam','selrow');
            if (id > 0) {
                $f.selectRow(id);
            } else {
                info_dialog("Внимание", "Пожалуйста, выберите категорию", null, $f.dialogOpt);
            }
        },
        selectMultiRows: function() {
            var q = opt||{};
            q.nodeid = $($f.tableId).jqGrid('getGridParam','selarrrow');
            q = $.param(q);
            location.href = $f.url + '?' + q;
        },
        createRow: function() {
            $($f.tableId).jqGrid('editGridRow', 'new', {} );
        }
    });

}) (<?= $this->jsObject ?>, jQuery);
    
</script>
<?= $this->grid ?>